From 2acf5f8966a40c1c9a97680c8dc263ee3f1ad3d1 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Wed, 2 Jul 2025 00:45:49 +0000 Subject: (대표님/최겸) 20250702 변경사항 업데이트 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engineering/(engineering)/report/page.tsx | 154 ++++++++++++++++----- 1 file changed, 118 insertions(+), 36 deletions(-) (limited to 'app/[lng]/engineering/(engineering)') diff --git a/app/[lng]/engineering/(engineering)/report/page.tsx b/app/[lng]/engineering/(engineering)/report/page.tsx index 3efaa7c3..eb932e0f 100644 --- a/app/[lng]/engineering/(engineering)/report/page.tsx +++ b/app/[lng]/engineering/(engineering)/report/page.tsx @@ -1,47 +1,129 @@ -import * as React from "react" -import { Skeleton } from "@/components/ui/skeleton" -import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton" -import { Shell } from "@/components/shell" +// app/procurement/dashboard/page.tsx +import * as React from "react"; +import { Skeleton } from "@/components/ui/skeleton"; +import { Shell } from "@/components/shell"; +import { ErrorBoundary } from "@/components/error-boundary"; +import { getDashboardData } from "@/lib/dashboard/service"; +import { DashboardClient } from "@/lib/dashboard/dashboard-client"; +// 대시보드 데이터 로딩 컴포넌트 +async function DashboardContent() { + try { + const data = await getDashboardData("engineering"); + + const handleRefresh = async () => { + "use server"; + return await getDashboardData("engineering"); + }; -export default async function IndexPage() { - + return ( + + ); + } catch (error) { + console.error("Dashboard data loading error:", error); + throw error; + } +} +// 대시보드 로딩 스켈레톤 +function DashboardSkeleton() { return ( - +
+ {/* 헤더 스켈레톤 */}
-
-

- Dashboard -

-

- 각종 지표 등을 대시보드로 표현하거나 리포트를 출력할 수 있습니다. -

+
+ + +
+ +
+ + {/* 요약 카드 스켈레톤 */} +
+ {[...Array(4)].map((_, i) => ( +
+
+ + +
+ + +
+ ))} +
+ + {/* 차트 스켈레톤 */} +
+ {[...Array(2)].map((_, i) => ( +
+
+ + +
+ +
+ ))} +
+ + {/* 탭 스켈레톤 */} +
+ +
+ {[...Array(6)].map((_, i) => ( +
+ +
+
+ + +
+
+ + + +
+ +
+
+ ))}
+
+ ); +} - }> - {/* */} - - - - } +// 에러 표시 컴포넌트 +function DashboardError({ error, reset }: { error: Error; reset: () => void }) { + return ( +
+
+

대시보드를 불러올 수 없습니다

+

+ {error.message || "알 수 없는 오류가 발생했습니다."} +

+
+ +
+ ); +} + +export default async function DashboardPage() { + return ( + + + }> + + + - ) -} \ No newline at end of file + ); +} -- cgit v1.2.3